package com.common.utils;

import org.springframework.lang.Nullable;

import java.util.Collection;
import java.util.Map;

/**
 * @Brief 集合工具类
 * @Author chenyl
 * @Date 2023-08-01
 * @Version 1.0.0
 */
public class CollectionUtils extends org.springframework.util.CollectionUtils {
    /**
     * 判断集合不为空
     *
     * @param collection 集合
     * @return true or false
     */
    public static boolean isNotEmpty(@Nullable Collection<?> collection) {
        return !isEmpty(collection);
    }

    /**
     * 判断map不为空
     *
     * @param map map
     * @return true or false
     */
    public static boolean isNotEmpty(@Nullable Map<?, ?> map) {
        return !isEmpty(map);
    }
}
